{{ $pager := .paginator }}
<ul class="pagination">
    <li class="page-item"><span class="page-link">共 {{$pager.Nums}} 条数据 </span></li>
    {{if $pager.HasPrev}}
        <li class="page-item"><a class="page-link" href="{{$pager.PageLinkFirst}}">首页</a></li>
        <li class="page-item"><a class="page-link" href="{{$pager.PageLinkPrev}}">上一页</a></li>
    {{else}}
        <li class="page-item disabled"><a class="page-link">首页</a></li>
        <li class="page-item disabled"><a class="page-link">上一页</a></li>
    {{end}}
    {{range $index, $page := $pager.Pages}}
        <li class="page-item {{if $pager.IsActive .}}active{{end}}">
            <a class="page-link" href="{{$pager.PageLink $page}}">{{$page}}</a>
        </li>
    {{end}}
    {{if $pager.HasNext}}
        <li class="page-item"><a class="page-link" href="{{$pager.PageLinkNext}}">下一页</a></li>
        <li class="page-item"><a class="page-link" href="{{$pager.PageLinkLast}}">尾页</a></li>
    {{else}}
        <li class="page-item disabled"><a class="page-link">下一页</a></li>
        <li class="page-item disabled"><a class="page-link">尾页</a></li>
    {{end}}
</ul>